/*
 * @Copyright: Copyright (c) 2030 吴周海
 * @Author: wzh200x@126.com
 * @Date: 2025-10-11 11:07:27
 * @LastEditors: wzh200x@126.com
 * @LastEditTime: 2025-10-27 14:08:45
 * @FilePath: \gogamewebserver\goGameWebServer\api\auth\v1\auth.go
 * @Description: 文件功能描述
 */
package v1

import "github.com/gogf/gf/v2/util/gmeta"

type AuthLoginReq struct {
	gmeta.Meta           `path:"/auth/login" method:"post" tags:"登录"`
	AccountName          string `p:"accountName" validate:"required"`
	Password             string `p:"password" validate:"required"`
	ThirdPlatformType    int    `p:"thirdPlatformType" validate:"required"`
	ThirdPlatform        string `p:"thirdPlatform"`
	ThirdAccount         string `p:"thirdAccount"`
	ThirdToken           string `p:"thirdToken"`
	ThirdTokenExpireTime int64  `p:"thirdTokenExpireTime"`
}

type AuthLoginRes struct {
	gmeta.Meta      `mime:"application/json" example:"{code:0, message:'', data:{accountName: '', accountId: 0, avatarId: 0, accessToken: '', tokenExpireTime: 0, thirdAccount: ''}}"`
	AccountName     string `json:"accountName"`
	AccountId       int    `json:"accountId"`
	AvatarId        int    `json:"avatarId"`
	AccessToken     string `json:"accessToken"`
	TokenExpireTime int64  `json:"tokenExpireTime"`
	ThirdAccount    string `json:"thirdAccount"`
}

type AuthUpdateTokenReq struct {
	gmeta.Meta `path:"/auth/update/token" method:"post" tags:"更新token"`
	AccountId  int `p:"accountId" validate:"account_id"`
}

type AuthUpdateTokenRes struct {
	gmeta.Meta      `mime:"application/json" example:"{code:0, message:'', data:{accessToken: '', tokenExpireTime: 0}}"`
	AccessToken     string `json:"accessToken"`
	TokenExpireTime int64  `json:"tokenExpireTime"`
}

type AuthPlatformLoginReq struct {
	gmeta.Meta        `path:"/platformLogin" method:"post" tags:"第三方登录"`
	ThirdPlatformType int    `p:"thirdPlatformType" validate:"required" dc:"第三方平台类型 1:微信 2:支付宝 3:抖音 4:支付宝(芭芭农场) 5:快手 6:vivo 7:oppo 8:小米 9:华为"`
	ThirdToken        string `p:"thirdToken"`
	ThirdCode         string `p:"thirdCode"`
	AppId             string `p:"appId"`
}

type AuthPlatformLoginRes struct {
	gmeta.Meta      `mime:"application/json" example:"{code:0, message:'', data:{thirdAccount: '', thirdSessionKey: ''}}"`
	ThirdAccount    string `json:"thirdAccount" dc:"第三方账号 openid"`
	ThirdSessionKey string `json:"thirdSessionKey"`
}
